home *** CD-ROM | disk | FTP | other *** search
XSetup plugin | 2001-04-13 | 2.0 KB | 84 lines |
- "FILE"="Xteq Systems X-Setup Plugin 6.0"
- "TYPE"="1"
- "COUNT"="2"
- "UIPATH 1"="Startup/Shutdown\Startup\Windows 9x/ME\60) Before Login Window"
- "UIPATH 2"="Startup/Shutdown\Startup\Windows NT/2K/XP\30) Before Login Window"
- "NAME"="Legal Notice"
- "VERSION"="1.54"
- "LANGUAGE"="VBScript"
- "TEXT 1"="Message Title"
- "TEXT 2"="Message Text"
- "DESCRIPTION 1"="You can configure a message that is displayed before a user is able to logon to this machine."
- "DESCRIPTION 2"="This message is normally used for legal notices or something similar."
- "DESCRIPTION 3"="Note that both fields have to contain a value, otherwise the message will not be displayed!"
- "AUTHOR"="Xteq Systems"
- "CONTACTURL"="http://www.xteq.com"
- "COPYRIGHT"="Copyright ⌐ Xteq Systems - All Rights Reserved"
- "COMMENT 1"=" "
- "COMMENT 2"="(Windows 95 Support by StaSys)"
-
-
- sP=""
- bOK=false
- v1="LegalNoticeCaption"
- v2="LegalNoticeText"
-
- Sub Plugin_Initialize
- sP="HKLM\Software\Microsoft\Windows NT\CurrentVersion\WinLogon\"
- if RegPathExists(sp) then
- 'Windows NT
- bOK=true
- else
- 'Windows 95?
- sP="HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WinLogon\"
- if RegPathExists(sp) then
- bOK=true
- else
- bOK=false
- end if
- end if
-
- if bOK=true then
- s=RegReadValue(sp&v1)
- Call SetUIElement(1,s)
-
- s=RegReadValue(sp&v2)
- Call SetUIElement(2,s)
- else
- Disable
- end if
- End Sub
-
- Sub Plugin_CheckData(ElementIndex)
- End Sub
-
- Sub Plugin_Apply(ElementIndex,ElementSubIndex)
- s1=GetUIElement(1)
- s2=GetUIElement(2)
-
- if Len(s1)>0 and Len(s2)>0 then
- Call RegWriteValue(sp&v1,s1,1)
- Call RegWriteValue(sp&v2,s2,1)
- Call Restart
- else
- if Len(s1)=0 and Len(s2)=0 then
- s=RegReadValue(sp&v1)
- if IsEmpty(s)=false then Call RegDeleteValue(sp&v1)
-
- s=RegReadValue(sp&v2)
- if IsEmpty(s)=false then Call RegDeleteValue(sp&v2)
-
- Call Logoff
- else
- Call MsgError("Please enter a text in both fields, otherwise the message will not be displayed.")
- end if
- end if
-
- End Sub
-
- Sub Plugin_Terminate
- End Sub
-
-
-
-